package com.candy.test;

import com.candy.dao.AccountDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client2 {
    public static void main(String[] args) {
//        创建容器
        ApplicationContext context=new ClassPathXmlApplicationContext("beans.xml");
//从容器中获取javabean对象
        AccountDao accountDao=(AccountDao) context.getBean("accountDao2");
        System.out.println(accountDao);


    }
}
